<template>
	<view>
		<view class="wrap">
			<view class="tips">
				<image src="@/static/admin/icon/success.png" mode=""></image>
				已成功为 {{length}} 位工人{{title}}安全积分 <text>{{score}}</text> 分
			</view>
			<view class="submitBtn" @click="goBack">
				确定
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: null,
				score: null,
				length: null,
				type: null
			}
		},
		onLoad(option) {
			this.score = option.score
			this.length = option.length
			this.type = option.type
			if (this.type == 'add') {
				this.title = "加"
			} else {
				this.title = "减"
			}
			uni.setNavigationBarTitle({
				title: ` ${this.title}分`
			})
		},
		methods: {
			goBack() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.tips {
		background: #EDF0F6;
		border-radius: 16rpx;
		padding: 20rpx;
		font-size: 28rpx;
		line-height: 2;
		margin-top: 40rpx;

		image {
			width: 36rpx;
			height: 36rpx;
			margin-right: 10rpx;
			transform: translateY(8rpx);
		}


		text {
			color: $main-red;
		}
	}

	.submitBtn {
		margin-top: 90rpx;
	}
</style>